$(function() {
    var
        $body = $('body'),

        url = location.search,

        loginUrl;

    if (url === '') {
        loginUrl = 'default';
    } else {
        loginUrl = url.split('=')[1];
    }

    $body.css("background-image", 'url("/cas/background?login_url=' + loginUrl + '")');
});
 
